#pragma once
// 日志等级设置模块
#include <iostream>
#include <string>
namespace LoggerSpace
{
    enum class LogLevel
    {
        DEBUG = 0,
        INFO,
        WARNING,
        Err,
        FATAL,
        UNKNOWN,
        OFF
    };
    // 再提供一个函数将枚举等级转换为字符串
    std::string levelToString(LoggerSpace::LogLevel lev)
    {
        switch (lev)
        {
        case LoggerSpace::LogLevel::DEBUG:
            return std::string("DEBUG");
        case LoggerSpace::LogLevel::INFO:
            return std::string("INFO");
        case LoggerSpace::LogLevel::WARNING:
            return std::string("WARNING");
        case LoggerSpace::LogLevel::Err:
            return std::string("Err");
        case LoggerSpace::LogLevel::FATAL:
            return std::string("FATAL");
        case LoggerSpace::LogLevel::OFF:
            return std::string("OFF");
        default:
            return std::string("UNKNOWN");
        }
    }
}